Title: Replication File for "Economic inequality, income, and their effects on electoral and civil society participation in authoritarian regimes"
Author: Lars Pelke
Correspondence: Lars Pelke, Heidelberg University (lars.pelke@ipw.uni-heidelberg.de)
Date: October 28th, 2020

Required Software: R and RStudio (3.6.1 or Above). 
Additional required software packages and libraries are specified in the replication code.

Overview: These files replicate all analyses in Lars Pelke (2020), "Iconomic inequality, income, and their effects on electoral and civil society participation in authoritarian regimes".
To replicate all analyses and figures, download all data files to a folder entitled "~/data", create a second folder entitled "~/output" 
and run all code files in numerical order. You can also use the provided 7zip-file. 
To directly replicate the main analysis, please use 01_wvs_basic_data.R, 02_wvs_voting_basic_models.R, 03_wvs_civilsoceity_basic_models.R. 

Prepared dataset, entitled "wvsdata.rds" is provided in the replication directory. 

%%%%%%%%%%%%%% Replication Code (relative path "~/calculations") %%%%%%%%%%%%%%

01_wvs_basic_data
Replicates the data wrangling process in the article. In addition, it compiles data needed for subsequent analysis. 

02_wvs_voting_basic_models
Replicates the main anayslis in the article. You can use this files directly by prepared datasets (wvsdata.rds)
or you can build the datasets with the 01_wvs_basic_data.R file. 

03_wvs_civilsoceity_basic_models
Replicates the main anayslis in the article. You can use this files directly by prepared datasets (wvsdata.rds)
or you can build the datasets with the 01_wvs_basic_data.R file. 

04_wvs_voting_robustness
Replicates the robustness tests (not the multiple imputation robustness test) for the voting models in the Supplementary Appendix. 

05_wvs_voting_multiple_imputation
Replicates the robustness tests based on multiple imputated datasets for the voting models in the Supplementary Appendix. 

06_wvs_civilsociety_robustness
Replicates the robustness tests (not the multiple imputation robustness test) for the civil society participation models in the Supplementary Appendix. 

07_wvs_civilsociety_multiple_iputation
Replicates the robustness tests based on multiple imputated datasets for the civil society participation models in the Supplementary Appendix. 


%%%%%%%%%%%%%% Data Files (relative path "~/data") %%%%%%%%%%%%%%

Replication data for data wrangling (are included in the data folder): 
- vdem_10 folder: Varieties of Democracy Version 10, Coppegde et al. 2020 (Creative Commons Attribution-ShareAlike License)
- vdem_8 folder: Varieties of Democracy Version 8, Coppegde et al. 2018 (Creative Commons Attribution-ShareAlike License)
- swiid8_3 folder: SWIID Dataset Version 8.3 (CC0 - "Public Domain Dedication") Solt 2020.
- all_the_ginnis folder: ALL THE GINIS Dataset (Creative Commons licensed under CC-BY 4.0)
- wvs folder: World Values Survey Time Series Dataset, 1981-2014 (Inglehart, R., et al. (eds.). 2014. World Values Survey: All Rounds - Country-Pooled Datafile Version)


%%%%%%%%%%%%%% Output Files (relative path "~/output") %%%%%%%%%%%%%%

Store outputs, such as Figures and Marginal Plots. All Latex-tables are directly implemented in the R File. 